//
//  TestAddressHeaderV.m
//  ShandsMod
//
//  Created by zh s on 2023/3/23.
//  Copyright © 2023 zh_s. All rights reserved.
//

#import "TestAddressHeaderV.h"

@implementation TestAddressHeaderV


- (instancetype)init {
    if (self = [super init]) {
        [self addViews];
    }
    return self;
}

- (void)addViews {
    UIView *backV = [BaseViewFactory viewWithFrame:CGRectMake(20, 0, SCREEN_WIDTH -40, 56) color:UIColor.whiteColor];
    [self addSubview:backV];
    [ToolsClass cellCornerRadius:13 withView:backV withByRoundingCorners:0];

    UIImageView *backImg = [[UIImageView alloc] init];
    [backV addSubview:backImg];
    backImg.image = IMAGE_NAME(@"bg_test_headerV");
    [backImg mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(0);
        make.top.mas_equalTo(0);
        make.width.mas_equalTo(335);
        make.height.mas_equalTo(348);
    }];
    
    UIImageView *iconImg = [[UIImageView alloc] init];
    [backV addSubview:iconImg];
    iconImg.image = IMAGE_NAME(@"icon_test_title");
    [iconImg mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(22);
        make.top.mas_equalTo(15);
        make.width.mas_equalTo(90);
        make.height.mas_equalTo(18);
    }];
    
    UIImageView *record = [[UIImageView alloc] init];
    [backV addSubview:record];
    record.image = IMAGE_NAME(@"icon_test_record");
    [record mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(iconImg.mas_left);
        make.top.mas_equalTo(iconImg.mas_bottom).mas_offset(3);
        make.width.mas_equalTo(70);
        make.height.mas_equalTo(10);
    }];

    
    
    UIImageView *addressView = [[UIImageView alloc] init];
    [backV addSubview:addressView];
//    addressView.image = IMAGE_NAME(@"icon_testAddress_bg");
    addressView.backgroundColor = UIColor.whiteColor;
    [addressView settingRadiusWithShadowOpacity:0.2 withShadowColor:RGB(153, 153, 153) wihtShadowRadius:5 withshadowOffset:CGSizeMake(0, 3) withRadius:12];

    [addressView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.mas_equalTo(backV.mas_right).mas_offset(-8);
        make.top.mas_equalTo(10);
        make.width.mas_equalTo(162);
        make.height.mas_equalTo(32);
    }];
    
    
    UIImageView *addressIcon = [[UIImageView alloc] init];
    [addressView addSubview:addressIcon];
    addressIcon.image = IMAGE_NAME(@"icon_home_address");
    [addressIcon mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(11);
        make.top.mas_equalTo(7);
        make.width.mas_equalTo(16);
        make.height.mas_equalTo(16);
    }];
    
    UILabel *allNumExplainL = [[UILabel alloc] init];
    [addressView addSubview:allNumExplainL];
    allNumExplainL.textColor = MAIN_BACKCOLOR;
    allNumExplainL.font = FONT_NAME(FONT_Regular, 12);
    allNumExplainL.text = @"挖矿地址挖矿地址";
    [allNumExplainL mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(35);
        make.top.mas_equalTo(5);
        make.size.mas_equalTo(CGSizeMake(SCREEN_WIDTH, 22));
    }];

    
    
}

@end
